import request from '@/utils/request'

export function getRoleList(data) {
  return request({
    url: '/auth/role/query/page',
    method: 'post',
    data
  })
}

export function getAllRole(data) {
  return request({
    url: '/auth/role/query/page',
    method: 'post',
    data
  })
}

export function addRole(data) {
  return request({
    url: '/auth/role/insertRole',
    method: 'post',
    data
  })
}

export function editRole(data) {
  return request({
    url: '/auth/role/updateRole',
    method: 'put',
    data
  })
}

export function deleteRole(data) {
  return request({
    url: '/auth/role/delete/' + data.roleId,
    method: 'delete',
    data
  })
}
